import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:shop/router/page_route_anim.dart';
import 'package:shop/test/FirstHomeScreen.dart';
import 'package:shop/test/SecondHomeScreen.dart';

class RouteName{
  static const String testFirst = "test/first";
  static const String testSecond = "test/second";
}

class MyRouter{
  static Route<dynamic> generateRoute(RouteSettings settings){
    switch(settings.name){
      case RouteName.testFirst:
        return NoAnimRouteBuilder(FirstHomeScreen());
      case RouteName.testSecond:
        return SlideTopRouteBuilder(SecondHomeScreen());
      default:
        return CupertinoPageRoute(
          builder: (_)=>Scaffold(
            body: Center(child: Text('No route defined for ${settings.name}'),),
          )
        );
    }
  }
}